package com.whfc.fmam.entity.enums;

/**
 * @Description:
 * @author: qzexing
 * @version: 1.0
 * @date: 2020/4/26 16:05
 */
public enum MatDiffResultType {

    NORMAL(0,"正常"),

    BEYOND(1,"超正差"),

    BELOW(-1,"超负差");

    private Integer value;

    private String desc;

    MatDiffResultType(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static MatDiffResultType parseValue(Integer value) {
        switch (value) {
            case 0:
                return NORMAL;
            case 1:
                return BEYOND;
            case -1:
                return BELOW;
            default:
                return null;
        }
    }

}
